﻿@model XPressify.Models.PageModelCreate
@using XPressify.Data.Helpers

@{
    ViewBag.Title = "Create page";
}

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend style="font-size:x-large;color:#222">Page</legend>
        
        <div class="editor-field">
            @Html.LabelFor(model => model.Name) : <br />
            @Html.TextBoxFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
         
        <div class="editor-field" style="height:100px">
            @Html.LabelFor(model => model.Description) : <br />
            @Html.TextAreaFor(model => model.Description, 4, 21, new { style = "resize: none;" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        
        <div class="editor-field">
            @Html.LabelFor(model => model.MembersCanPost) : <br />
            @Html.DropDownListFor(model => model.MembersCanPost, new List<SelectListItem> { new SelectListItem { Text = "True", Value = Boolean.TrueString }, new SelectListItem { Text = "False", Value = Boolean.FalseString } })
            @Html.ValidationMessageFor(model => model.MembersCanPost)
        </div>   
        
        <div class="editor-field">
            @Html.LabelFor(model => model.Privacy) : <br />
            @Html.DropDownListFor(model => model.Privacy, new List<SelectListItem> { new SelectListItem { Text = "Public", Value = SubjectPrivacy.Public.ToString() }, new SelectListItem { Text = "Private", Value = SubjectPrivacy.Private.ToString() } })
            @Html.ValidationMessageFor(model => model.Privacy)
        </div> 

    </fieldset>

}
